while(low<=high)
        {
mid = (high+low)/2;
        if(R[mid].key==k)
        return mid;
    else if(R[mid].key>k)
high = mid-1;
        else
low = mid+1;
        }
        return -1;


int binSearch(int k)
{
    int low=0,high=n-1,mid;
    while(low<=high)
    {
        mid = (high+low)/2;
        System.out.print(mid+" ");
        if(R[mid].key==k)
            return mid;
        else if(R[mid].key>k)
            high = mid-1;
        else
            low = mid+1;
    }
    return -1;
}